<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
   <script>     
        function rgb(){
        	var r = Math.floor(Math.random()*256);
        	var g = Math.floor(Math.random()*256);
        	var b = Math.floor(Math.random()*256);
        	return "rgb("+r+','+g+','+b+")";
        }
          /*
          改变页面的背景颜色
        */
        function changePageColor()
        {
            var color = rgb();
           /* console.log(color);*/
            document.body.style.background = color;
        }
    </script>
</head>
<body bgcolor="green" align="center">	
    <input type="button" value="ChangePageColor" onclick="changePageColor();"/>
</body>
</html>
